---
title: Contacts
description: A library that provides access to the phone's system contacts.
sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-contacts'
packageName: 'expo-contacts'
iconUrl: '/static/images/packages/expo-contacts.png'
platforms: ['android', 'ios']
---

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { AndroidPermissions, IOSPermissions } from '~/components/plugins/permissions';
import {
  ConfigReactNative,
  ConfigPluginExample,
  ConfigPluginProperties,
} from '~/ui/components/ConfigSection';
import { SnackInline } from '~/ui/components/Snippet';

`expo-contacts` provides access to the device's system contacts, allowing you to get contact information as well as adding, editing, or removing contacts.

On iOS, contacts have a multi-layered grouping system that you can also access through this API.

## Installation

<APIInstallSection />

## Configuration in app.json/app.config.js

You can configure `expo-contacts` using its built-in [config plugin](/config-plugins/introduction/) if you use config plugins in your project ([EAS Build](/build/introduction) or `npx expo run:[android|ios]`). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect.

<ConfigPluginExample>

```json app.json
{
  "expo": {
    "plugins": [
      [
        "expo-contacts",
        {
          "contactsPermission": "Allow $(PRODUCT_NAME) to access your contacts."
        }
      ]
    ]
  }
}
```

</ConfigPluginExample>

<ConfigPluginProperties
  properties={[
    {
      name: 'contactsPermission',
      platform: 'ios',
      description: 'A string to set the [`NSContactsUsageDescription`](#ios) permission message.',
      default: '"Allow $(PRODUCT_NAME) to access your contacts"',
    },
  ]}
/>

<ConfigReactNative>

Learn how to configure the native projects in the [installation instructions in the `expo-contacts` repository](https://github.com/expo/expo/tree/main/packages/expo-contacts#installation-in-bare-react-native-projects).

</ConfigReactNative>

## Usage

<SnackInline label='Basic Contacts Usage' dependencies={['expo-contacts']}>

```jsx
import React, { useEffect } from 'react';
import { StyleSheet, View, Text } from 'react-native';
import * as Contacts from 'expo-contacts';

export default function App() {
  useEffect(() => {
    (async () => {
      const { status } = await Contacts.requestPermissionsAsync();
      if (status === 'granted') {
        const { data } = await Contacts.getContactsAsync({
          fields: [Contacts.Fields.Emails],
        });

        if (data.length > 0) {
          const contact = data[0];
          console.log(contact);
        }
      }
    })();
  }, []);

  return (
    <View style={styles.container}>
      <Text>Contacts Module Example</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
```

</SnackInline>

## API

```js
import * as Contacts from 'expo-contacts';
```

<APISection packageName="expo-contacts" apiName="Contacts" />

## Permissions

### Android

You must add the following permissions to your **app.json** inside the [`expo.android.permissions`](/versions/latest/config/app/#permissions) array.

<AndroidPermissions permissions={['READ_CONTACTS', 'WRITE_CONTACTS']} />

### iOS

The following usage description keys are used by this library:

<IOSPermissions permissions={['NSContactsUsageDescription']} />
